<template xmlns="http://www.w3.org/1999/html">
  <el-scrollbar class="scrollbar_home">
    <div
        :class="{'navigation':true, 'fullNavigation':fullScreen.isFull}"
    >
      <div class="top">
        <div class="fullSelect" id="navigation-top">
          <el-icon :color="'#fa8c35'" :size="40" class="fullSelect" @click="full_screen">
            <VideoCameraFilled />
          </el-icon>
        </div>

        <div class="top_title">标题</div>
      </div>


      <div class="box">
        <div class="text_1_1_ch text_ch">
          皮影戏从有文字记载，已经有2000多年的历史。皮影戏<br>
          始于西汉，兴于唐朝，盛于清代，元代时期传外国，可谓<br>
          历史悠久，源远流长。
        </div>
        <div class="text_1_1_en text_en">
          Shadow puppetry has a history of over 2000 years. with written<br>
          records. Shadow puppetry originated in the Western Han Dynas<br>
          !fourished in the Tang Dynasty, fourished in the Oing Dynastv<br>
          .was passed down to foreign countries during the Yuan Dynasty. it can<br>
          be said that it has a long history and a long history.
        </div>
        <div class="text_1_2_ch text_ch">
          源于河北省唐山市乐亭皮影，据《松花江文艺志》载:<br>
          1756年(清乾降四十一年)，大批河北开户旗丁涌入黑龙<br>
          江地区，其中就有河北皮影戏艺人在各地演出，深受群<br>
          众欢迎。随着时代的发展，皮影戏艺人为满足东北百姓<br>
          审美情趣，大量吸收了当地语言和民间音乐的丰富营<br>
          养，皮影艺术逐渐地方化。
        </div>
        <div class="text_1_2_en text_en">
          Shadow puppetry has a history of over 2000 years. with written<br>
          records. Shadow puppetry originated in the Western Han Dynas<br>
          !fourished in the Tang Dynasty, fourished in the Oing Dynastv<br>
          .was passed down to foreign countries during the Yuan Dynasty. it can<br>
          be said that it has a long history and a long history.
        </div>
        <div class="text_1_3_ch text_ch">
          双城皮影戏是流传于黑龙江省哈尔滨市双城区的传<br>
          统艺术形式。而双城皮影唱腔高亢、清脆，采用了二<br>
          人转等艺术唱腔。形成了高亢、粗犷、激越的黑龙江皮<br>
          影戏艺术特色。入选黑龙江第二批省级非物质文化遗<br>
          女
        </div>
        <div class="text_1_3_en text_en">
          Shadow puppetry has a history of over 2000 years. with written<br>
          records. Shadow puppetry originated in the Western Han Dynas<br>
          !fourished in the Tang Dynasty, fourished in the Oing Dynastv<br>
          .was passed down to foreign countries during the Yuan Dynasty. it can<br>
          be said that it has a long history and a long history.
        </div>
      </div>

      <div class="box">
        <div class="category">
          <div
              :class="{
                        'category_item':true,
                        'category_item_selected': category_selectBoolean(1)
                      }"
              @click="category_select(1)"
          >
            分类一
          </div>
          <div
              :class="{
                        'category_item':true,
                        'category_item_selected': category_selectBoolean(2)
                      }"
              @click="category_select(2)"
          >
            分类二
          </div>
          <div
              :class="{
                        'category_item':true,
                        'category_item_selected': category_selectBoolean(3)
                      }"
              @click="category_select(3)"
          >
            分类三
          </div>
        </div>
      </div>


      <div class="back_top" @click="jump_to_top">
        <el-icon :size="26"><ArrowUpBold /></el-icon>
      </div>

    </div>
  </el-scrollbar>
</template>

<script setup>
import {ref} from 'vue';
import {ArrowUpBold, VideoCameraFilled} from "@element-plus/icons-vue";
import { fullScreenState } from '@/stores/fullScreenState';

const fullScreen = fullScreenState()
const category_selectNum = ref(1)

const full_screen = () => {
  fullScreen.turnIsFull();
}

const category_selectBoolean = (key) => {
  return category_selectNum.value === key;
}
const category_select = (key) => {
  category_selectNum.value = key;
}

const jump_to_top = () => {
  const element = document.getElementById('navigation-top');
  if (element) {
    element.scrollIntoView({
      behavior: 'smooth'
    });
  }
}
</script>

<style scoped>
.scrollbar_home{
  height: 100%;
  width: 100%;
  position: fixed;
  padding: 0;
  display: flex;
}
.navigation{
  min-height: 91vh;
  width: 193.3vh;
  padding: 1vh 0;
  background-image: url("src/components/navigation/backgroud_color.png");
  transition: all 0.3s ease-in-out;
  position: relative;
  top: 0;
  left: 0;
  font-family: "黑体-简", "微软雅黑", "文泉驿微米黑",serif;
}
.fullNavigation{
  min-height: 100vh;
  width: 198.3vh;
  top: 0;
  margin: 0;
}

.top{
  display: flex;
  height: 10vh;
  width: 98%;
  margin: 0 1% 0 1%;
  border-bottom: 1px solid #896c39;
}
.top_title{
  font-size: 32px;
  position: relative;
  left: 46%;
}
.fullSelect{
  height: 6vh;
  width: 6vh;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  margin: 1vh 0 0 1vh;
}
.fullSelect:hover{
  transform: scale(1.1);
}

.box{
  height: 100vh;
  width: 100%;
  border-bottom: 1px solid #896c39;
  overflow: hidden;
}
.category{
  height: 10vh;
  width: 100%;
  border-bottom: 2px solid #896c39;
  display: flex;
  padding-left: 2vh;
}
.category_item{
  height: 100%;
  width: 8%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 0.5%;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  color: #8c4356;
  font-weight: 600;
  font-size: 22px;
}
.category_item_selected{
  border-bottom: 5px solid #ff4c00;
  color: #ff4c00;
  border-radius: 2px;
}
.category_item:hover{
  background-color: rgba(255,255,255,0.3);
}
.back_top{
  height: 8vh;
  width: 8vh;
  position: fixed;
  right: 9vh;
  bottom: 9vh;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: #ffc773;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}
.back_top:hover{
  transform: scale(1.1);
  background-color: #fff143;
}

.text_ch{
  font-size: 18px;
  font-weight: 600;
  color: #c83c23;
}
.text_en{
  font-size: 16px;
}

/* 文字布局 */
.text_1_1_ch{
  position: relative;
  left: 3%;
  top: 20%;
}
.text_1_1_en{
  position: relative;
  left: 3%;
  top: 20%;
}
.text_1_2_ch{
  position: relative;
  left: 3%;
  top: 40%;
}
.text_1_2_en{
  position: relative;
  left: 60%;
  top: -30%;
}
.text_1_3_ch{
  position: relative;
  left: 60%;
  top: -20%;
}
.text_1_3_en{
  position: relative;
  left: 60%;
  top: -20%;
}


</style>